<?php
FLEA::loadClass('FLEA_Db_TableDataGateway');
class Table_tofowordPic extends FLEA_Db_TableDataGateway
{
   var $tableName = 'tofoword_pic';
   var $primaryKey = 'id';

   function getpicbyword($word){
        $pics = $this->findBySql('SELECT a.id,a.Word,a.No,a.Type,a.rank,b.id as text_id,b.pic_text,b.pic_text_zh FROM `tofoword_pic` a inner join tofoword_text b on (a.No=b.No and a.Word=b.Word) where a.Word ="' . $word . '" and a.status=1 order by a.rank');
        return $pics;
   }
}
